package com.zhx.freedom.say.diary;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述: 自由说-日记服务模块启动主类
 *
 * @author 周浩西
 * @date 2019/3/28 17:58
 */

@SpringBootApplication(scanBasePackages = "com.zhx")
@MapperScan("com.zhx")
@RestController
@EnableFeignClients
public class FreeDomSayDiaryServiceApplication {

    public static final Logger logger = LoggerFactory.getLogger(FreeDomSayDiaryServiceApplication.class);
    public static void main(String[] args) {
        long startTime = System.currentTimeMillis();
        SpringApplication.run(FreeDomSayDiaryServiceApplication.class,args);
        logger.info("··········自由说-日记服务模块启动完成·············");
        long endTime = System.currentTimeMillis();
        logger.info("··········服务启动耗时{}毫秒·············",(endTime-startTime));
    }

    @RequestMapping("/getName/{name}")
    public String getDiaryById(@PathVariable String name){
      return name;
    }



}
